Skip to content

Revert "Use Puppet-Datatype Sensitive" #1410

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 1 commit into from

Conversation

ghoneycutt
Copy link
Contributor

This reverts commit 8413dbe.

@ghoneycutt ghoneycutt requested a review from a team as a code owner June 30, 2021 16:14
@puppet-community-rangefinder
Copy link

mysql::password is a function

Breaking changes to this file WILL impact these 7 modules (exact match):
Breaking changes to this file MAY impact these 1 modules (near match):

mysql_password is a function

Breaking changes to this file WILL impact these 17 modules (exact match):
Breaking changes to this file MAY impact these 26 modules (near match):

mysql::backup::mysqlbackup is a class

that may have no external impact to Forge modules.

mysql::backup::mysqldump is a class

that may have no external impact to Forge modules.

mysql::backup::xtrabackup is a class

that may have no external impact to Forge modules.

mysql::bindings is a class

Breaking changes to this file WILL impact these 14 modules (exact match):
Breaking changes to this file MAY impact these 17 modules (near match):

mysql::bindings::client_dev is a class

that may have no external impact to Forge modules.

mysql::bindings::daemon_dev is a class

that may have no external impact to Forge modules.

mysql::db is a type

Breaking changes to this file WILL impact these 67 modules (exact match):
Breaking changes to this file MAY impact these 16 modules (near match):

mysql::params is a class

Breaking changes to this file WILL impact these 2 modules (exact match):
Breaking changes to this file MAY impact these 1 modules (near match):

mysql::server is a class

Breaking changes to this file WILL impact these 77 modules (exact match):
Breaking changes to this file MAY impact these 51 modules (near match):

mysql::server::backup is a class

Breaking changes to this file WILL impact these 4 modules (exact match):

mysql::server::monitor is a class

that may have no external impact to Forge modules.

mysql::server::root_password is a class

that may have no external impact to Forge modules.

This module is declared in 143 of 576 indexed public Puppetfiles.


These results were generated with Rangefinder, a tool that helps predict the downstream impact of breaking changes to elements used in Puppet modules. You can run this on the command line to get a full report.

Exact matches are those that we can positively identify via namespace and the declaring modules' metadata. Non-namespaced items, such as Puppet 3.x functions, will always be reported as near matches only.

@ghoneycutt
Copy link
Contributor Author

The addition of this commit broke unit testing and should not have been merged. The release process seems to have been messed up as this commit in the history should be in the v11.0.3 release though when you check out that tag the commit is missing.

The errors below were introduced with commit 8413dbe

Pending: (Failures listed here are expected and do not affect your suite's status)

  1) mysql::password behaves like mysql::password function returns Sensitive with sensitive=true
     # should have a Returnvalue of Datatype Sensitive
     Failure/Error: is_expected.to run.with_params('password', true).and_return(sensitive('*2470C0C06DEE42FD1618BB99005ADCA2EC9D1E19'))
       expected mysql::password("password", true) to have returned Sensitive("*2470C0C06DEE42FD1618BB99005ADCA2EC9D1E19") instead of #<Sensitive [value redacted]>
     Shared Example Group: "mysql::password function" called from ./spec/functions/mysql_password_spec.rb:46
     # ./spec/functions/mysql_password_spec.rb:29:in `block (2 levels) in <top (required)>'
     # /opt/puppetlabs/pdk/share/cache/ruby/2.7.0/bin/rspec:23:in `load'
     # /opt/puppetlabs/pdk/share/cache/ruby/2.7.0/bin/rspec:23:in `<top (required)>'
     # /opt/puppetlabs/pdk/private/ruby/2.7.3/bin/bundle:23:in `load'
     # /opt/puppetlabs/pdk/private/ruby/2.7.3/bin/bundle:23:in `<main>'

  2) mysql::password non-namespaced shim mysql_password behaves like mysql::password function returns Sensitive with sensitive=true
     # should have a Returnvalue of Datatype Sensitive
     Failure/Error: is_expected.to run.with_params('password', true).and_return(sensitive('*2470C0C06DEE42FD1618BB99005ADCA2EC9D1E19'))
       expected mysql::password("password", true) to have returned Sensitive("*2470C0C06DEE42FD1618BB99005ADCA2EC9D1E19") instead of #<Sensitive [value redacted]>
     Shared Example Group: "mysql::password function" called from ./spec/functions/mysql_password_spec.rb:50
     # ./spec/functions/mysql_password_spec.rb:29:in `block (2 levels) in <top (required)>'
     # /opt/puppetlabs/pdk/share/cache/ruby/2.7.0/bin/rspec:23:in `load'
     # /opt/puppetlabs/pdk/share/cache/ruby/2.7.0/bin/rspec:23:in `<top (required)>'
     # /opt/puppetlabs/pdk/private/ruby/2.7.3/bin/bundle:23:in `load'
     # /opt/puppetlabs/pdk/private/ruby/2.7.3/bin/bundle:23:in `<main>'

@pmcmaw
Copy link
Contributor

pmcmaw commented Jun 30, 2021

Pending: (Failures listed here are expected and do not affect your suite's status) Please note, these tests are marked as pending, therefore don't actually affect the test suite status.
I have also ran them locally from main with no failures other than what you have highlighted above (but this is not an issue).

2744 examples, 0 failures, 2 pending is the final result, a pending test is not a failing or broken test, therefore I don't think this revert is necessary.

As for the issue with release, I will look into it now.

@pmcmaw pmcmaw closed this Jun 30, 2021
@ghoneycutt ghoneycutt deleted the fix_mysql branch June 30, 2021 16:39
@pmcmaw
Copy link
Contributor

pmcmaw commented Jun 30, 2021

I agree with the issue on release, I can see it was supposed to make the v11.0.3 release but something has happened there, but the fact it is not tagged or included in the CHANGELOG means there is nothing needed on our end right now, other than a release containing the change (this will happen Monday) something slipped through the cracks there.

@ghoneycutt
Copy link
Contributor Author

It shows pending locally though is breaking tests in CI.

@pmcmaw
Copy link
Contributor

pmcmaw commented Jul 1, 2021

PR has been merged to stop this breaking, there is something going on with CI as it is pending and passes locally - nice catch! :-) #1412

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants